package com.cwg.dict.ui.rcp.views;

import org.eclipse.swt.SWT;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;

public class DictionaryView extends ViewPart {

	public static final String	ID	= "com.cwg.dict.DictionaryView";
	private Browser				browser;
	private String				url	= "";

	@Override
	public void createPartControl(Composite parent) {
		browser = new Browser(parent, SWT.NONE);
		browser.setUrl(url);
	}

	public String getUrl() {
		return url;
	}

	@Override
	public void setFocus() {
		// do nothing
	}

	@Override
	public void setPartName(String partName) {
		super.setPartName(partName);
	}

	public void setUrl(String url) {
		this.url = url;
		browser.setUrl(url);
	}

}
